package com.zixuan.sina.controller;

import com.zixuan.sina.service.UserReflectionShipService;
import com.zixuan.sina.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/message")
public class MessageController {
    @Resource
    private UserReflectionShipService userReflectionShipService;
    /***
     * 根据双方id查询聊天记录信息
     */
    @GetMapping("/getMessageById")
    public Result getMessageById(@RequestParam("userId") String userId,@RequestParam("friendId") String friendId){
        return userReflectionShipService.getMessageById(userId,friendId);

    }
}
